package com.ui.design.view.JRTTChannel;

import android.widget.TextView;

import com.alibaba.android.arouter.facade.annotation.Route;
import com.ui.design.R;
import com.ui.design.main.base.BaseActivity;
import com.ui.design.main.constants.Constants;
import com.ui.design.view.JRTTChannel.demochannel.ChannelDialog;
import com.ui.design.view.JRTTChannel.demochannel.ChannelEntity;

import java.nio.channels.Channel;

@Route(path = Constants.JRTT)
public class JrttChannelActivity extends BaseActivity {

    @Override
    protected int initLayout() {
        return R.layout.jrtt_channel_activity;
    }

    @Override
    protected void initView() {
        TextView textView=findViewById(R.id.channel_text);
        ChannelDialog channelDialog=new ChannelDialog(JrttChannelActivity.this, (entities) -> {
            StringBuilder s= new StringBuilder("已选：\n");
            for (ChannelEntity channel:entities){
                s.append(channel.getName()).append("\n");
            }
            textView.setText(s);
        });
        findViewById(R.id.btn_channl).setOnClickListener(v -> channelDialog.show());
    }

    @Override
    protected void initData() {
    }
}